<!DOCTYPE html>
<html>
<head>
    <title>设置</title>
    <?php $this->load->module('admin/index/page_header');?>
</head>
<body>
<div class="wrap">

    <div class="nav">
        <ul>
            <li><a href="<?php echo site_url('weixin/admin/card')?>">微名片管理</a></li>
            <?php if(CS){?><li><a href="<?php echo site_url('admin/adminuser/add?type=wmp');?>">添加微名片</a></li><?php }?>
            <li class="current"><a href="<?php echo site_url('weixin/admin/cardsetting');?>">微名片模板</a></li>
        </ul>
    </div>

    <div class="table_full">
        <form class="formvalidate" action="" method="post">
            <div class="h_a">微名片模板</div>
            <div class="table_full">
                <table width="100%">
                    <col class="th" />
                    <col/>
                    <tbody>
                    <tr>
                        <th>微名片模板</th>
                        <td>
                            <select name="row[weixincardtpl]" id="dopreview" onchange="$('#preview').attr('src', '<?php echo site_url()?>/static/weixincard/preview/'+this.value+'.png');">
                                <option <?php echo $row['weixincardtpl'] == 'default' ? 'selected':''?> value="default">默认风格</option>
                                <option <?php echo $row['weixincardtpl'] == 'simple' ? 'selected':''?> value="simple">简约风格</option>
                                <option <?php echo $row['weixincardtpl'] == 'texture' ? 'selected':''?> value="texture">质感风格</option>
                                <option <?php echo $row['weixincardtpl'] == 'qingxin' ? 'selected':''?> value="qingxin">清新风格</option>
                                <option <?php echo $row['weixincardtpl'] == 'glass1' ? 'selected':''?> value="glass1">玻璃风格1</option>
                                <option <?php echo $row['weixincardtpl'] == 'glass2' ? 'selected':''?> value="glass2">玻璃风格2</option>
                                <option <?php echo $row['weixincardtpl'] == 'glass3' ? 'selected':''?> value="glass3">玻璃风格3</option>
                                <option <?php echo $row['weixincardtpl'] == 'glass4' ? 'selected':''?> value="glass4">玻璃风格4</option>
                                <option <?php echo $row['weixincardtpl'] == 'colorful' ? 'selected':''?> value="colorful">多彩风格</option>
                            </select>
                            &nbsp;&nbsp;
                        <span class="fun_tips">微名片模板，仅在微名片页面生效，其他页面风格不会发生变化</span>
                        </td>
                    </tr>
                    <tr>
                        <th>微名片模板预览</th>
                        <td>
                            <img id="preview" height="400" src="<?php echo site_url('static/weixincard/preview/'.($row['weixincardtpl'] ?$row['weixincardtpl'] :'default').'.png')?>" />
                        </td>
                    </tr>
                    <tr>
                        <th>&nbsp;</th>
                        <td>
                            <button type="submit" class="btn btn_submit J_ajax_submit_btn">保存</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </form>
    </div>
</div>
</body>
</html>